/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import dataAccess.ReportJpaController;
import entities.Report;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author QUY-THI
 */
public class EditReport {

    public boolean editReport(Report re) {
        try {
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("E-AdministrationPU");
            ReportJpaController rj = new ReportJpaController(emf);
            rj.edit(re);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
